//
//  Tool.m
//  DriveStudy
//
//  Created by chen on 2017/4/16.
//  Copyright © 2017年 chen. All rights reserved.
//

#import "Tool.h"

@implementation Tool
+(NSArray *)getAnswerFromString:(NSString *)str{
    NSMutableArray *array = [[NSMutableArray alloc]init];
    NSArray *arr = [str componentsSeparatedByString:@"<BR>"];
    [array addObject:arr[0]];
    for (int i = 0; i< 4; i ++) {
        [array addObject:[arr[i+1] substringFromIndex:2]];
    }
    return array;
}

+(CGSize)getSizeFromString:(NSString *)str withFont:(UIFont *)font withSize:(CGSize)size{
    CGSize mysize = [str sizeWithFont:font constrainedToSize:size];
    return mysize;
}
@end
